3.4 \(\int \sec (e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx\)

Optimal. Leaf size=38 \[ \frac {a c \tanh ^{-1}(\sin (e+f x))}{2 f}-\frac {a c \tan (e+f x) \sec (e+f x)}{2 f} \]

[Out]

1/2*a*c*arctanh(sin(f*x+e))/f-1/2*a*c*sec(f*x+e)*tan(f*x+e)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3958, 2611, 3770} \[ \frac {a c \tanh ^{-1}(\sin (e+f x))}{2 f}-\frac {a c \tan (e+f x) \sec (e+f x)}{2 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

(a*c*ArcTanh[Sin[e + f*x]])/(2*f) - (a*c*Sec[e + f*x]*Tan[e + f*x])/(2*f)

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3958

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_)
)^(n_.), x_Symbol] :> Dist[(-(a*c))^m, Int[ExpandTrig[csc[e + f*x]*cot[e + f*x]^(2*m), (c + d*csc[e + f*x])^(n
 - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegersQ[m,
 n] && GeQ[n - m, 0] && GtQ[m*n, 0]

Rubi steps

\begin {align*} \int \sec (e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \sec (e+f x) \tan ^2(e+f x) \, dx\right )\\ &=-\frac {a c \sec (e+f x) \tan (e+f x)}{2 f}+\frac {1}{2} (a c) \int \sec (e+f x) \, dx\\ &=\frac {a c \tanh ^{-1}(\sin (e+f x))}{2 f}-\frac {a c \sec (e+f x) \tan (e+f x)}{2 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 38, normalized size = 1.00 \[ -a c \left (\frac {\tan (e+f x) \sec (e+f x)}{2 f}-\frac {\tanh ^{-1}(\sin (e+f x))}{2 f}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-(a*c*(-1/2*ArcTanh[Sin[e + f*x]]/f + (Sec[e + f*x]*Tan[e + f*x])/(2*f)))

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 67, normalized size = 1.76 \[ \frac {a c \cos \left (f x + e\right )^{2} \log \left (\sin \left (f x + e\right ) + 1\right ) - a c \cos \left (f x + e\right )^{2} \log \left (-\sin \left (f x + e\right ) + 1\right ) - 2 \, a c \sin \left (f x + e\right )}{4 \, f \cos \left (f x + e\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/4*(a*c*cos(f*x + e)^2*log(sin(f*x + e) + 1) - a*c*cos(f*x + e)^2*log(-sin(f*x + e) + 1) - 2*a*c*sin(f*x + e)
)/(f*cos(f*x + e)^2)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (2*pi/x/2)>(-2*pi/
x/2)Unable to check sign: (2*pi/x/2)>(-2*pi/x/2)-2/f*(a*c/8*ln(abs(sin(f*x+exp(1))-1))-a*c/8*ln(abs(sin(f*x+ex
p(1))+1))-sin(f*x+exp(1))*a*c*1/4/(sin(f*x+exp(1))^2-1))

________________________________________________________________________________________

maple [A]  time = 0.66, size = 42, normalized size = 1.11 \[ \frac {c a \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2 f}-\frac {a c \sec \left (f x +e \right ) \tan \left (f x +e \right )}{2 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

1/2/f*c*a*ln(sec(f*x+e)+tan(f*x+e))-1/2*a*c*sec(f*x+e)*tan(f*x+e)/f

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 68, normalized size = 1.79 \[ \frac {a c {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 4 \, a c \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right )}{4 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

1/4*(a*c*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) + 4*a*c*log(sec
(f*x + e) + tan(f*x + e)))/f

________________________________________________________________________________________

mupad [B]  time = 2.24, size = 77, normalized size = 2.03 \[ \frac {a\,c\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{f}-\frac {a\,c\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+a\,c\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + a/cos(e + f*x))*(c - c/cos(e + f*x)))/cos(e + f*x),x)

[Out]

(a*c*atanh(tan(e/2 + (f*x)/2)))/f - (a*c*tan(e/2 + (f*x)/2)^3 + a*c*tan(e/2 + (f*x)/2))/(f*(tan(e/2 + (f*x)/2)
^4 - 2*tan(e/2 + (f*x)/2)^2 + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - a c \left (\int \left (- \sec {\left (e + f x \right )}\right )\, dx + \int \sec ^{3}{\left (e + f x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

-a*c*(Integral(-sec(e + f*x), x) + Integral(sec(e + f*x)**3, x))

________________________________________________________________________________________